In an Internet application, users often need to gather for a group activity, for example, a colleague group, a city friends group, and a conference group. A user inside of a group needs to learn member information of group members; however, when a user joins in or withdraws from a group, group member information changes, which requires a server to synchronize the group member information.
In an application scenario for a mega-class extra large group, each group member can obtain member information that includes a list of other members of the group. For joining and withdrawal of a group member, each member of the group receives a broadcast message, and thereby a local list is maintained in real time. For example, a star is an honored guest or gives a performance in a group; and in this scenario, a large number of users gather together.
In a process of implementing the synchronization of the group member information, the server has the following functions:
the server stores and maintains information (which is generally represented in a group member list) about all members of the group, and updates the group member information after a group member enters or exits; if a group member enters, current member information of the server is sent to the group member that newly enters, and a message is pushed to all members of the group, declaring that a group member enters; and in an application scenario with an extra large group, due to a limitation by a factor such as network bandwidth, the group member information is not sent all at once but generally needs to be sent in segments for multiple times to the group member that newly enters.
In the foregoing solutions, a server needs to send current member information to a group member that newly enters, and therefore a data packet of corresponding group member information needs to be generated for each group member that newly enters. In a scenario in which there are many group members that newly enter within a short period of time, overload of the server is easily caused, causing a network service to be unstable.